package com.blb.zycommunity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 区域表
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Data
@TableName("sys_area")
@ApiModel(value = "SysArea对象", description = "区域表")
public class SysArea implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("唯一主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("城市编码")
    private Integer code;

    @ApiModelProperty("城市名称")
    private String name;

    @ApiModelProperty("城市父ID")
    private Integer parentId;

    @ApiModelProperty("城市等级(0:省,1:市,2:县)")
    private Integer level;

    @ApiModelProperty("功能类型(1:角色认证地点开通;0:未开通)")
    private Integer type;

    @ApiModelProperty("服务状态")
    private Integer servicestate;

    @ApiModelProperty("逻辑删除 0正常 1 删除")
    private Integer deleteFlag;

    @ApiModelProperty("地区范围")
    private Integer region;

    @TableField(exist = false)
    private List<SysArea> children;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getServicestate() {
        return servicestate;
    }

    public void setServicestate(Integer servicestate) {
        this.servicestate = servicestate;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getRegion() {
        return region;
    }

    public void setRegion(Integer region) {
        this.region = region;
    }

    @Override
    public String toString() {
        return "SysArea{" +
            "id = " + id +
            ", code = " + code +
            ", name = " + name +
            ", parentId = " + parentId +
            ", level = " + level +
            ", type = " + type +
            ", servicestate = " + servicestate +
            ", deleteFlag = " + deleteFlag +
            ", region = " + region +
        "}";
    }
}
